<?php

namespace app\api\validate;

use think\Validate;
use app\common\Error;

class Tiktok extends Validate
{
    protected $rule = [
        'code' => 'require',
        'app_id' => 'require',
        'type' => 'require',
        'number' => 'require',
        'name' => 'require',
        'total_fee' => 'require',
    ];

    protected $message  =   [
        'code.require' => Error::CODE_NOT_EXIXTS,
        'app_id.require' => Error::APP_ID_NOT_EXIXTS,
        'type.require' => Error::PAY_DATA_REQUEST_PARAMATER_NOT_EXIXTS.'type',
        'number.require' => Error::PAY_DATA_REQUEST_PARAMATER_NOT_EXIXTS.'number',
        'name.require' => Error::PAY_DATA_REQUEST_PARAMATER_NOT_EXIXTS.'name',
        'total_fee.require' => Error::PAY_DATA_REQUEST_PARAMATER_NOT_EXIXTS.'total_fee',
    ];

    protected $scene = [
        'login' =>  ['code', 'app_id'],
        'place_order' => ['type', 'number', 'name', 'total_fee'],
    ];
}